﻿using CrawlerFramework.Models;
using GenericRepository.EF;
using System.Linq;

namespace CrawlerFramework.Repository
{
    public class ScheduledJobRepository : BaseCrawlerRepository<ScheduledJob>
    {
        public override void Edit(ScheduledJob entity)
        {
            var check = this.Single(c => c.JobGuid == entity.JobGuid);
            if (check != null)
            {
                entity.ScheduledJobId = check.ScheduledJobId;
                base.Edit(entity);
            }
        }
    }
}